/*
 * ColumnModel.java
 *
 * Copyright 2012 the original author or authors(ninglong).
 *
 * Licensed under the org.geek.common.base, Version 1.0 (the "License");
 *
 */
package org.geek.common.entity;

/**
 * <p></p>
 * @author ninglong bhd2973@qq.com
 * @version V1.0
 */
public class ColumnModel {
	
	private String header;
	
	private String dataIndex;

	private String rendererFn;
	
	private int width;
	
	private boolean hidden;
	
	private boolean sortable;
	
	/**
	 * @param header 表头
	 * @param dataIndex  数据列
	 * @param rendererFn  renderer函数，如果就写函数名，没有就写null
	 * @param width 宽度
	 * @param hidden 是否隐藏
	 * @param sortable 是否启用排序
	 */
	public ColumnModel(String header, String dataIndex, String rendererFn,
			int width, boolean hidden, boolean sortable) {
		this.header = header;
		this.dataIndex = dataIndex;
		this.rendererFn = rendererFn;
		this.width = width;
		this.hidden = hidden;
		this.sortable = sortable;
	}
	/**
	 * @param header 表头
	 * @param dataIndex  数据列
	 * @param rendererFn  renderer函数，如果就写函数名，没有就写null
	 * @param width 宽度
	 * @param hidden 是否隐藏
	 * @param sortable 是否启用排序
	 */
	public ColumnModel(String header, String dataIndex,
			int width, boolean hidden, boolean sortable) {
		this.header = header;
		this.dataIndex = dataIndex;
		this.width = width;
		this.hidden = hidden;
		this.sortable = sortable;
	}
	/**
	 * @param header 表头
	 * @param dataIndex  数据列
	 * @param rendererFn  renderer函数，如果就写函数名，没有就写null
	 * @param hidden 是否隐藏
	 * @param sortable 是否启用排序
	 */
	public ColumnModel(String header, String dataIndex, String rendererFn,
			 boolean hidden, boolean sortable) {
		this.header = header;
		this.dataIndex = dataIndex;
		this.rendererFn = rendererFn;
		this.hidden = hidden;
		this.sortable = sortable;
	}
	/**
	 * @param header 表头
	 * @param dataIndex  数据列
	 * @param hidden 是否隐藏
	 * @param sortable 是否启用排序
	 */
	public ColumnModel(String header, String dataIndex,
			boolean hidden, boolean sortable) {
		this.header = header;
		this.dataIndex = dataIndex;
		this.hidden = hidden;
		this.sortable = sortable;
	}
	
	public String getHeader() {
		return header;
	}

	public void setHeader(String header) {
		this.header = header;
	}

	public String getDataIndex() {
		return dataIndex;
	}

	public void setDataIndex(String dataIndex) {
		this.dataIndex = dataIndex;
	}

	public String getRendererFn() {
		return rendererFn;
	}

	public void setRendererFn(String rendererFn) {
		this.rendererFn = rendererFn;
	}

	public int getWidth() {
		return width;
	}

	public void setWidth(int width) {
		this.width = width;
	}

	public boolean isHidden() {
		return hidden;
	}

	public void setHidden(boolean hidden) {
		this.hidden = hidden;
	}

	public boolean isSortable() {
		return sortable;
	}

	public void setSortable(boolean sortable) {
		this.sortable = sortable;
	}
}
